package MainClass;


public class Updater extends Thread
{
	Game game;

	  Updater()
	  {
	   this.game = Game.GameBuilder();
	  } // Updater

	  public void run()
	  {	   
	    int i=0;
		 while(true)
	    {
	      synchronized(game)
	      {
	        while(true)
	        {
	          
	          try {
	        	  	game.wait();
	               } catch(InterruptedException ie)
	                 {
	                     System.out.println("Exception: " + ie.getMessage());
	                  } // catch  
	          game.UpdateAllCommponet();
	         // System.out.println("In Update" + i++);
	        } // while

	      } // synchronized(grec)
	    } // while

	  } // run

}

